package com.ibangnuo.api.commercial;

import com.ibangnuo.framework.domain.Channel;
import com.ibangnuo.framework.domain.ext.CommercialTenantExt;
import com.ibangnuo.framework.domain.ext.CommercialTenantNewExt;
import com.ibangnuo.framework.domain.request.commercial.CommercialTenantNewRequest;
import com.ibangnuo.framework.domain.request.commercial.CommercialTenantRequest;
import com.ibangnuo.framework.model.response.ObjectResult;
import com.ibangnuo.framework.model.response.QueryResponseResult;
import com.ibangnuo.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import java.util.List;
import java.util.Map;

/**
 * @Author: wwy
 * @Date: 2019-12-30 10:10
 */
@Api(value="商户管理",description = "商户管理，增删改查")
public interface CommercialControllerApi {

    @ApiOperation("添加报表")
    ResponseResult add(CommercialTenantExt commercialTenantExt);

    @ApiOperation("通道申请")
    ResponseResult Channel( Channel channel);

    @ApiOperation("通道编辑数据回显")
    QueryResponseResult EditChannel(String commercialId);

    @ApiOperation("分页条件查询商户")
    QueryResponseResult findList(CommercialTenantRequest commercialTenantRequest);

    @ApiOperation("根据id查找")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "商户表主键",required=true,paramType="path",dataType="String"),
    })
    ObjectResult findById(String id);

    @ApiOperation("根据id更新")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "商户表主键",required=true,paramType="path",dataType="String"),
    })
    ResponseResult update(String id,CommercialTenantExt commercialTenantExt);
    @ApiOperation("根据id修改状态")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "商户表主键",required=true,paramType="path",dataType="String"),
    })
    ResponseResult delete(String id);

    @ApiOperation("根据id修改图片资源")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "商户表主键",required=true,paramType="path",dataType="String"),
    })
    ResponseResult updateImage(String id, Map<String,Object> map);


    @ApiOperation("新版增加商户")
    ObjectResult addNew(CommercialTenantNewExt commercialTenantNewExt);

    @ApiOperation("根据id查找")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "商户表主键",required=true,paramType="path",dataType="String"),
    })
    ObjectResult findByIdNew(String id);

    @ApiOperation("查询商户的名称")
    QueryResponseResult selectAllName();

    @ApiOperation("不映射查询全部")
    QueryResponseResult findByCommercialAndCommercialDetails(int page, int size, CommercialTenantNewRequest commercialTenantNewRequest);

    @ApiOperation("获取图片map格式")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "商户表主键",required=true,paramType="path",dataType="String"),
    })
    ObjectResult findImgById(String id);

    @ApiOperation("根据代理商id查询商户")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "代理商主键",required=true,paramType="path",dataType="String"),
    })
    ObjectResult findByAgentId(String id);

    @ApiOperation("统计商户")
    ObjectResult findCommercialCount();

    @ApiOperation("批量删除商户")
    ResponseResult deleteListById(List<String> ids);


}
